Deploying Service Layer

  1. Rename the ServiceLayer war from the distribution to ServiceLayer.war.

  2. Deploy ServiceLayer war in webapps folder of Tomcat application server.

  3. Navigate to the bin folder of Tomcat and open the command prompt in this location to start the server by using the command

    • startup.bat run - Windows

    • ./startup.sh start - Linux

  1. Test the deployment with the following url:

  2. http://hostname:port/PASService/rest/services/resourcename ( resourcename : policies/clients etc).

    Note: If you change the context name, use that name in the URL instead of PASService.

  3. Database Driver and URL Configurations

  4. Since Tomcat doesn't have any UI, all the data sources should be created manually in <app-context>.xml file in catalina/conf directory.

  5. Below are the parameters and their corresponding values for different databases.

DB Drivers Config

Oracle
jdbcDriver = oracle.jdbc.driver.OracleDriver
jdbcUrl = jdbc:oracle:thin:@<host>:<port>:<sid>
 
DB2
jdbcDriver = com.ibm.db2.jcc.DB2Driver
jdbcUrl = jdbc:db2://<host>:<port>/<databasename>:currentSchema=<schemaname>;
For DB2, if the schema name and username are different, please append currentfunctionpath to above url.

Example:

jdbcDriver = com.ibm.db2.jcc.DB2Driver
jdbcUrl = jdbc:db2://<host>:<port>/<databasename>:currentSchema=      <schemaname>;currentFunctionPath=SYSIBM,SYSFUN,SYSPROC,SYSIBMADM,SYSHADOOP,USERNAME,SCHEMANAME;
SQLServer
jdbcDriver = com.microsoft.sqlserver.jdbc.SQLServerDriver
jdbcUrl = jdbc:sqlserver://<host>:<port>;DatabaseName=<databasename>

Example: For SQL Server

When the encrypt property is set to true and the trustServerCertificate property is set to true, the Microsoft JDBC Driver for SQL Server won't validate the SQL Server TLS certificate. This setting is common for allowing connections in test environments, such as where the SQL Server instance has only a self-signed certificate.

jdbcUrl = jdbc:sqlserver://<host>:<port>;DatabaseName=<databasename>;encrypt=true;trustServerCertificate=true